package com.bwie.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.bwie.pojo.TbKeepBaby;
import com.bwie.service.TbKeepBabyService;
import com.bwie.utils.R;
import com.bwie.vo.LoanVo;
import com.bwie.vo.PageInfoVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @projectName: server-week2
 * @package: com.bwie.controller
 * @className: IndexController
 * @author: 杨珂
 * @description: TODO
 * @date: 2025/7/3 9:57
 * @version: 1.0
 */
@RestController
@RequestMapping("/assets/index")
public class IndexController {


    @Autowired
    TbKeepBabyService tbKeepBabyService;


    /**
     * @param pageInfoVo:
     * @return R
     * @author :杨珂
     * @description 获取列表
     * @date 2025/7/3 11:51
     */
    @PostMapping("/getKeepBabyList")
    public R getKeepBabyList(@RequestBody PageInfoVo pageInfoVo) {
        return tbKeepBabyService.getKeepBabyList(pageInfoVo);
    }

    /**
     * @param loanVo:
     * @return R
     * @author :杨珂
     * @description 提现
     * @date 2025/7/3 11:51
     */
    @PostMapping("/addToBank")
    public R addToBank(@RequestBody LoanVo loanVo) {
        return tbKeepBabyService.addToBank(loanVo);
    }

}
